<?php
require_once 'LoanWriteOffs.php';

class Loan_LegalController extends HTech_Controller_Action
{
    public function init()
    {
        $cfg = array(
            'model' => 'LoanWriteOffs',
            'actionContext' => array(
                'view' => array('prn','mob'))
        );
        parent::init($cfg);         
    }
    
    public function viewAction()
    {        
        $id = (int) $this->_request->getParam('id');
        try {
            $this->view->loan = new Emms_WrittenOffLoan($id);
        } catch (Exception $e) {
            $this->_helper->flashMessenger->addMessage($e->getMessage());
            $this->redirect('/default/auth/deny'); 
        }
        $this->_helper->layout->setLayout('view');
    }
}
